package com.mls.fivedistrict.task;

import com.mls.fivedistrict.server.NewsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 这个类用来修新闻和快讯的点赞阅读分享的奖励数目
 */
@Slf4j
public class ModifyRewardForNewsAndNewFlash {
    //    @Autowired
//    GoodsOrderService goodsOrderService;
//    @Autowired
//    NewsService newsService;
//    @Autowired
//    NewsFlashService newsFlashService;
//    @Autowired
//    private ModifyRewardForNewsAndNewFlashService modifyRewardForNewsAndNewFlashService;
    @Autowired
    private NewsService newsService;

    /**
     * 修改订单的三个奖励数目并使之变成1/10
     */
    public void modifyReward() {
        log.info("开始修改订单的奖励数目");
//        int update = modifyRewardForNewsAndNewFlashService.modifyReward();
        int update = newsService.modifyReward();
        log.info("修改完成，影响的行数：" + update);
    }
}
